package com.eati.cm.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonManagedReference;

import javax.persistence.*;

@Entity
@Table(name = "story_work")
public class StoryWork extends Work{

    @ManyToOne
    @JoinColumn(name = "story_genre_id", nullable = false)
    //@JsonManagedReference
    @JsonIgnoreProperties(value = "storyWorkBelongsToList")
    public StoryGenre genre;

    public StoryWork(String name, StoryGenre genre) {
        super(name);
        this.genre = genre;
    }
    public StoryWork(){
        super();
    }
}
